<%@ page import="bid.dao.UserDao" %>
<%@ page import="bid.dao.impl.UserDaoImpl" %>
<%@ page import="bid.entity.User" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: oldliu
  Date: 2023-10-24
  Time: 14:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>管理员信息</title>
</head>
<body>
<%
    UserDao userDao = new UserDaoImpl();
    List<User> users = userDao.search(1, 10, null, null, null, null);
%>
<p style="text-align: right">
    <a href="addUser.jsp">新增一个管理员</a>
</p>
<table border="1" cellpadding="0" cellspacing="0">
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>手机号</th>
        <th>登录名</th>
        <th>入职时间</th>
        <th>操作</th>
    </tr>
    <%
        for (User u : users) {
    %>
    <tr>
        <td><%=u.getId()%>
        </td>
        <td><%=u.getName()%>
        </td>
        <td><%=u.getTelephone()%>
        </td>
        <td><%=u.getUsername()%>
        </td>
        <td><%=u.getEnterdate()%>
        </td>
        <td>
            <a onclick="return confirm('真的要删除码？')" href="delUser.jsp?id=<%=u.getId()%>">删除</a>
            <a  href="updateUser.jsp?id=<%=u.getId()%>">修改</a>
        </td>
    </tr>
    <%}%>
</table>
</body>
</html>
